import 'package:flutter/material.dart';
import 'package:xindong/common/xindong_sezhi.dart';
import 'package:xindong/common/xindong_define.dart';
import 'package:xindong/common/xindong_all.dart';

class XinDongProfileSectionNoneWidget extends StatelessWidget {
  final String title;
  final String? content;
  final bool removeBottom;
  final Function()? onTap;

  const XinDongProfileSectionNoneWidget(
      {Key? key, required this.title, this.content, this.onTap, this.removeBottom = true})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    const TextStyle textStyle = TextStyle(color: DZColors.titleColor, fontSize: 16, fontWeight: FontWeight.w600);
    const TextStyle contentTextStyle = TextStyle(color: DZColors.contentColor, fontSize: 15);
    return GestureDetector(
      onTap: onTap,
      child: Container(
        height: removeBottom ? kCellHeight - 16 : kCellHeight,
        color: DZColors.cellColor,
        padding: const EdgeInsets.only(left: 16, right: 10),
        margin: const EdgeInsets.only(top: 8),
        child: Row(
          crossAxisAlignment: removeBottom ? CrossAxisAlignment.end : CrossAxisAlignment.center,
          children: [
            Text(title, style: textStyle),
            const SizedBox(width: 8),
            Text(content ?? "", style: contentTextStyle),
            const Expanded(child: SizedBox()),
            if (onTap != null) XinDongAll.instance.defaultIconNext,
          ],
        ),
      ),
    );
  }
}
